package com.kygeng.springframework.aop;

import org.aopalliance.intercept.MethodInterceptor;

/**
 * @Title: AdvisedSupport
 * @Author: kygeng
 * @Package: com.kygeng.springframework.aop
 * @Date: 2024/8/10 15:37
 * @Description: 包装切面通知对象：主要是用于把代理、拦截、匹配的各项属性包装到一个类中，方便在 Proxy 实现类进行使用。
 */
public class AdvisedSupport {

    // ProxyConfig
    private boolean proxyTargetClass = false;

    //被代理的目标对象
    private TargetSource targetSource;

    //方法拦截器
    private MethodInterceptor methodInterceptor;

    //方法匹配器（检查目标方法是否符合条件）
    private MethodMatcher methodMatcher;

    public boolean isProxyTargetClass() {
        return proxyTargetClass;
    }

    public void setProxyTargetClass(boolean proxyTargetClass) {
        this.proxyTargetClass = proxyTargetClass;
    }

    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {
        this.methodInterceptor = methodInterceptor;
    }

    public MethodMatcher getMethodMatcher() {
        return methodMatcher;
    }

    public void setMethodMatcher(MethodMatcher methodMatcher) {
        this.methodMatcher = methodMatcher;
    }
}
